CREATE TABLE [dbo].[sys_fun] (
[fun_id] int NOT NULL IDENTITY(1,1) ,
[icon] varchar(128) COLLATE Chinese_PRC_CI_AS NULL ,
[fun_path] varchar(128) COLLATE Chinese_PRC_CI_AS NULL ,
[is_enabled] varchar(32) COLLATE Chinese_PRC_CI_AS NULL ,
[super_id] int NULL ,
[fun_name] varchar(32) COLLATE Chinese_PRC_CI_AS NULL ,
[fun_btns] varchar(512) COLLATE Chinese_PRC_CI_AS NULL ,
CONSTRAINT [PK__sys_fun__35A47928108B795B] PRIMARY KEY ([fun_id])
);


CREATE TABLE [dbo].[sys_log] (
[log_id] int NOT NULL IDENTITY(1,1) ,
[user_id] int NULL ,
[create_time] datetime NULL ,
[log_content] varchar(2000) COLLATE Chinese_PRC_CI_AS NULL ,
[ip] varchar(128) COLLATE Chinese_PRC_CI_AS NULL ,
[user_name] varchar(32) COLLATE Chinese_PRC_CI_AS NULL ,
CONSTRAINT [PK__sys_log__9E2397E01BFD2C07] PRIMARY KEY ([log_id])
);

CREATE TABLE [dbo].[sys_power] (
[power_id] int NOT NULL IDENTITY(1,1) ,
[user_id] int NULL ,
[fun_id] int NULL ,
[power_btns] varchar(512) COLLATE Chinese_PRC_CI_AS NULL ,
CONSTRAINT [PK__sys_powe__028A29F9182C9B23] PRIMARY KEY ([power_id])
);


CREATE TABLE [dbo].[sys_user] (
[user_id] int NOT NULL IDENTITY(1,1) ,
[user_account] varchar(128) COLLATE Chinese_PRC_CI_AS NULL ,
[user_pass] varchar(128) COLLATE Chinese_PRC_CI_AS NULL ,
[user_type] varchar(32) COLLATE Chinese_PRC_CI_AS NULL ,
[user_status] varchar(32) COLLATE Chinese_PRC_CI_AS NULL ,
[reg_time] datetime NULL ,
[user_name] varchar(32) COLLATE Chinese_PRC_CI_AS NULL ,
[power_id] int NULL ,
CONSTRAINT [PK__sys_user__B9BE370F0AD2A005] PRIMARY KEY ([user_id])
);


INSERT INTO [sys_user] VALUES ( 'develeper', '202CB962AC59075B964B07152D234B70', 'developer', 'activate', '2017-3-16 15:39:30', '开发者', NULL);
GO
INSERT INTO [sys_user] VALUES ( 'jackchen', '202CB962AC59075B964B07152D234B70', 'user', 'activate', '2017-4-23 13:17:20', '陈大自', NULL);
GO




INSERT INTO [sys_fun] VALUES ( NULL, ' ', '是', 8, '土地档案管理', 'add,del,dels,edit');
GO
INSERT INTO [sys_fun] VALUES ( NULL, ' ', '是', -1, '系统管理', 'add,del,dels,edit');
GO
INSERT INTO [sys_fun] VALUES ( NULL, 'myinfo', '是', 5, '个人信息', NULL);
GO
INSERT INTO [sys_fun] VALUES ( NULL, ' ', NULL, -1, '档案管理', NULL);
GO
INSERT INTO [sys_fun] VALUES ( NULL, 'file-list', NULL, 1, '土地档案查询', NULL);
GO
INSERT INTO [sys_fun] VALUES ( NULL, 'log-list', NULL, 5, '日志管理', NULL);